axios.interceptors.request.use(function (config) {
  config.url = 'http://124.223.14.236:8060/admin' + config.url
  config.headers['x-token'] = localStorage.getItem('x-token') || ''
  return config
})
axios.interceptors.response.use(function (response) {
  if (response.data.errmsg === '未登录，不允许操作！') {
    localStorage.removeItem('x-token')
    window.parent.location.href = '/youdianda_static/login.html'
  }
  return response
})
